//
//  QDCycleView.m
//  QuickDoctor
//
//  Created by Eric on 2016-12-21.
//  Copyright © 2016 Eric. All rights reserved.
//

#import "QDCycleView.h"

@implementation QDCycleView

-(instancetype)initWithFrame:(CGRect)frame
{
    if(self = [super initWithFrame:frame])
    {
        [self setupUI];
    }
    return self;
}

-(void)setupUI
{
    CGFloat imgW = [UIScreen mainScreen].bounds.size.width;
    CGFloat imgH = 210;
    //数据
    NSArray *imagesURLStrings = @[
                                  @"http://dl.bizhi.sogou.com/images/2013/07/11/345634.jpg",
                                  @"http://d.hiphotos.baidu.com/image/pic/item/91ef76c6a7efce1bd6d9bdcbad51f3deb58f65c4.jpg",
                                  @"http://c.hiphotos.baidu.com/image/pic/item/63d9f2d3572c11dfeba36e3d612762d0f703c2ba.jpg"
                                  ];
    
    SDCycleScrollView *cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, imgW, imgH) delegate:nil placeholderImage:[UIImage imageNamed:@"placeholder"]];
    cycleScrollView.currentPageDotImage = [UIImage imageNamed:@"illness_rb_img_nor"];
    cycleScrollView.pageDotImage = [UIImage imageNamed:@"illness_rb_img_sel"];
    cycleScrollView.imageURLStringsGroup = imagesURLStrings;
    [self addSubview:cycleScrollView];
}

@end
